/*!*********************************************************************************
 * X2Engine Open Source Edition is a customer relationship management program developed by
 * X2 Engine, Inc. Copyright (C) 2011-2019 X2 Engine Inc.
 * 
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License version 3 as published by the
 * Free Software Foundation with the addition of the following permission added
 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
 * IN WHICH THE COPYRIGHT IS OWNED BY X2ENGINE, X2ENGINE DISCLAIMS THE WARRANTY
 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU Affero General Public License along with
 * this program; if not, see http://www.gnu.org/licenses or write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 * 
 * You can contact X2Engine, Inc. P.O. Box 610121, Redwood City,
 * California 94061, USA. or at email address contact@x2engine.com.
 * 
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * X2 Engine" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by X2 Engine".
 **********************************************************************************/




/*
 * Styling page for publishers (e.g., Action history publisher).
 * Most of the icons are generated here.
 *
 */
@import "x2-icons";
@import "icons";

#history {
    .pager {
        border: none;
        margin: 0;
    }
    .attachment-img {
        max-height: 100px;
        margin: 5px;
        display: block;
        max-width: none;
    }
}

#publisher {
    & > .form2 {
        background: $background; 
        /* @theme background: content */
        textarea, label, .action-duration-display, .reminder-config {
            /* @theme color: text */
        }
    }
    > {
        .ui-tabs-nav {
            /*display: inline-block;*/
            display: block;
            float: left;
            margin-bottom: 0px;
        }
        #publisher-tabs-row-1 {
            border-right: none !important;
            margin-right: -10px;
            li {
                margin-top: 0px !important;
            }
        }

/***********************************************************************
* multi row tabs
***********************************************************************/
        #publisher-tabs-row-1, #publisher-tabs-row-2 {
            padding-top: 0 !important;
            padding-left: 0 !important;
            li {
                /* @theme background: dark_content */
                /* @theme border: darker_content */
                margin-right: 2px !important;

                &.ui-state-active {
                    position: relative;
                    z-index: 2;

                    /* @theme background: content */
                    /* @theme border: border */
                }
            }
        }
        #publisher-tabs-row-2 {
            width: 100%;
            box-sizing: border-box;
            height: 32px;
            margin-bottom: -6px !important;
            margin-top: 0px;
            background: white;
            border: 1px solid #e0e0e0;
            border-radius: 0px;
            border-left: none;
            border-right: none;
            border-bottom: none;
            
            li {
                &:first-child {
                    margin-left: 3px;
                }
                margin-top: -1px !important;
                height: 24px;
            }

            &.unselected-tab-row {
                background: white;
            }
        }

    }
    &.multi-row-tabs-publisher .form {
        position: relative;
        top: -1px;
    }
}


/***********************************************************************
* comment tab
***********************************************************************/
#new-comment .text-area-wrapper, #products .text-area-wrapper {
    margin-bottom: 5px;
}

/***********************************************************************
* action tab
***********************************************************************/
.action-event-panel {
    .action-reminder-container {
        font-size: 12px;
        line-height: 22px;
        select, input, div {
            float: left;
        }
        select {
            margin-left: 4px;
        }
        > div {
            border-radius: 3px;
            border: 1px solid rgb(206, 206, 206);
            background: white;
            padding: 5px;
            margin-bottom: 6px;
        }
    }
}


/*********************************
* Publisher and History Icon mapping
********************************/
$fa-map: (
    ("action" "play-circle")
    ("attachment" "paperclip")
    ("complete" "play-circle")
    ("email" "envelope")
    ("email_quote" "envelope")
    ("email_invoice" "envelope")
    ("call" "phone")
    ("note" "comment-o")
    ("overdue" "" "exclamation")
);

$x2-map: (
    ("workflow" "funnel")
    ("time" "stopwatch")
    ("quotes" "quotes")
    ("campaignEmailOpened" "open-envelope")
    ("emailOpened" "open-envelope")
);

 #publisher .icon,
 .action.list-view .icon {
         &.action {
                 background: url(../images/actions.png) no-repeat center center;
         }
         &.attachment {
                 background: url(../images/action_attachment.png) no-repeat center center;
         }
         &.complete {
                 @include stacked-icon('check');
                 background: url(../images/eventIcons/action_complete.png) no-repeat center center;
         }
         &.workflow {
                 background: url(../images/action_workflow.png) no-repeat center center;
         }
         &.email {
                 background: url(../images/eventIcons/email_sent.png) no-repeat center center;
         }
         &.email_quote {
                 background: url(../images/action_email_quote.png) no-repeat center center;
         }
         &.email_invoice {
                background: url(../images/action_email_invoice.png) no-repeat center center;
         }
         &.campaignEmailOpened, &.emailOpened {
                 background: url(../images/eventIcons/email_opened.png) no-repeat center center;
         }
         &.note {
                 background: url(../images/x2flow/X2FlowRecordComment.png) no-repeat center center;
         }
         &.emailOpened_quote {
                 background: url(../images/eventIcons/email_opened_quote.png) no-repeat center center;
         }
         &.emailOpened_invoice {
                 background: url(../images/eventIcons/email_opened_invoice.png) no-repeat center center;
         }
         &.call {
                 background: url(../images/action_call.png) no-repeat center center;
         }
         &.marketing {
                 background: url(../images/action_marketing.png) no-repeat center center;
         }
         &.event {
                 background: url(../images/calendar.png) no-repeat center center;
         }
         &.emailFrom {
                 background: url(../images/eventIcons/email_sent.png) no-repeat center center;
         }
         &.quotes {
                 background: url(../images/quotes.png) no-repeat center center;
         }
         &.webactivity {
                 background: url(../images/action_webactivity.png) no-repeat center center;
         }
         &.overdue {
                 background: url(../images/actions.png) no-repeat center center;
         }
         &.time {
                 background: url(../images/action_time.png) no-repeat center center;
         }
         &.products {
                 background: url(../images/quotes.png) no-repeat center center;
         }
 }
